app.controller("baseController", function($scope) {

	//分页控件配置 
	$scope.paginationConf = {
		currentPage: 1,
		totalItems: 10,
		itemsPerPage: 10,
		perPageOptions: [10, 20, 30, 40, 50],
		onChange: function() {
			$scope.reloadList(); //重新加载
		}
	};

	//封装分页查询方法
	$scope.reloadList = function() {
		$scope.search($scope.paginationConf.currentPage, $scope.paginationConf.itemsPerPage);
	}

	//定义选中删除的ID
	$scope.selectIds = [];
	//更新复选
	$scope.updateSelection = function($event, id) {
		if($event.target.checked) {
			$scope.selectIds.push(id);
		} else {
			//获取要删除id的索引
			var index = $scope.selectIds.indexOf(id);
			//删除ID
			$scope.selectIds.splice(index, 1);
		}
	}
});